package com.ehome.poct.core.pasre.report.text;


import com.ehome.poct.base.api.enums.StripTypeEnums;
import com.ehome.poct.core.pasre.report.AbstractFactory;

import java.util.HashMap;
import java.util.Map;

/**
 * @auther: kuiba.peng
 * @date: 2022/11/10 14:39
 * @description:
 */
public class TextStrategyFactory extends AbstractFactory<TextStrategy> {

    private final static Map<StripTypeEnums, TextStrategy> STRATEGY_HASH_MAP = new HashMap<>();

    static {
        STRATEGY_HASH_MAP.put(StripTypeEnums.DEFAULT_TYPE, new DefaultTextStrategy());
        STRATEGY_HASH_MAP.put(StripTypeEnums.HBA1C, new HBA1CTextStrategy());
        STRATEGY_HASH_MAP.put(StripTypeEnums.CRP, new CRPTextStrategy());
    }

    private static final TextStrategyFactory INSTANCE = new TextStrategyFactory();


    private TextStrategyFactory() {
        super(STRATEGY_HASH_MAP);
    }

    public static TextStrategyFactory getINSTANCE() {
        return INSTANCE;
    }
}
